package com.bawei.module_detail.adapter


import android.view.View
import com.bawei.module_detail.R
import com.bawei.module_detail.model.entity.RecommendSimpleVideoEntity
import com.bumptech.glide.Glide
import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.viewholder.BaseViewHolder

class RecommendAdapter : BaseQuickAdapter<RecommendSimpleVideoEntity,RecommendAdapter.RecommendViewHolder>(R.layout.item_video_detail) {


    class RecommendViewHolder(binding : View) : BaseViewHolder(binding)

    override fun convert(holder: RecommendViewHolder, item: RecommendSimpleVideoEntity) {
        Glide.with(holder.itemView.context).load(item.avatar_url).into(holder.getView(R.id.ivThumbnail))
        holder.setText(R.id.ivTitle,item.description)
        holder.setText(R.id.ivName,item.name)
    }
}